package cn.wolfcode.luowowo.service;

import cn.wolfcode.luowowo.domain.Destination;
import cn.wolfcode.luowowo.query.DestinationQuery;
import org.springframework.data.domain.Page;

import java.util.List;

public interface IDestinationService {
    //获取全部
    List<Destination> list();
    //获取单个
    Destination selectOne(String id);

    Page<Destination> query(DestinationQuery qo);

    Destination saveOrUpdate(Destination destination);

    Object queryByRegionId(String rid);

    /**
     * 根据parentId查询对应的目的地集合
     * @param parentId
     * @return
     */
    List<Destination> getToast(String parentId);

    /**通过regionId查询目的地集合
     *
     * @param regionId
     * @return
     */
    List<Destination> queryByRegionIdFor(String regionId);

    void delete(String id);

    Destination get(String id);

    Destination getByName(String keyword);
}
